Skip to content

Add token versioning #420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

Conversation

iraj720
Copy link

@iraj720 iraj720 commented Nov 23, 2024

i have added versioning to the library. i think it makes it easier since we are facing this challenge.

also it doesn't effect other parts of the projects.

Thanks.

@iraj720 iraj720 mentioned this pull request Nov 23, 2024
Copy link

@melissamforbs melissamforbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v

Copy link

@melissamforbs melissamforbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

b

@iraj720
Copy link
Author

iraj720 commented May 8, 2025

@melissamforbs
@dgrijalva

could you please mention another maintainer so we can merge it?

Thanks

@oxisto
Copy link
Collaborator

oxisto commented May 8, 2025

This seems to be a very specific use-case and personally I do not see a good reason to support something like this. You can always have a claims structure that looks like this (roughly)

type versionedClaims struct {
   jwt.RegisteredClaims
   V1 struct { /*... */ }
   V2 struct { /*... */ }
}

and then override UnmarshalJSON and MarshalJSON to fill the V1 or V2 properties based on an arbitrary property. The RFC itself does not specify any "version" variable or something similar.

@mfridman
Copy link
Member

mfridman commented May 8, 2025

Thanks for the PR, but this is a fairly specific use case, and I don't think it belongs in the core library.

@mfridman mfridman closed this May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants